Skip to content

Instantly share code, notes, and snippets.

@hannesl
hannesl / gist:3864416
Created October 10, 2012 09:43
Delete/cancel a Drupal user programmatically and safely.
// Tell Drupal to cancel this user.
// The third argument can be one of the following:
// - user_cancel_block: disable user, leave content
// - user_cancel_block_unpublish: disable user, unpublish content
// - user_cancel_reassign: delete user, reassign content to uid=0
// - user_cancel_delete: delete user, delete content
user_cancel(array(), $uid, 'user_cancel_reassign');
// user_cancel() initiates a batch process. Run it manually.
$batch =& batch_get();
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active March 9, 2026 13:50
Conventional Commits Cheatsheet
@bryanbellato
bryanbellato / pre-calculus-roadmap.txt
Last active March 9, 2026 13:49
ROADMAP de Matemática até Pré-Calculo
ROADMAP de Matemática antes de Cálculo 1:
BÁSICO DO BÁSICO:
- As quatro operações básicas
- Expressões númericas
- Frações
- Operações com números decimais
- Dízimas Periódicas
- Múltiplos e Divisores
- Critérios de Divisibilidade
package require Tk
set count 0
# Label that displays the count
label .lbl -text "Count: $count" -font {Helvetica 18}
pack .lbl -padx 20 -pady 10
proc update {} {
global count
@velvet-shark
velvet-shark / openclaw-50-day-prompts.md
Last active March 9, 2026 13:47
OpenClaw after 50 days: all prompts for 20 real workflows (companion to YouTube video)

OpenClaw after 50 days: all prompts

Companion prompts for the video: OpenClaw after 50 days: 20 real workflows (honest review)

These are the actual prompts I use for each use case shown in the video. Copy-paste them into your agent and adjust for your setup. Most will work as-is or the agent will ask you clarifying questions.

Each prompt describes the intent clearly enough that the agent can figure out the implementation details. You don't need to hand-hold it through every step.

My setup: OpenClaw running on a VPS, Discord as primary interface (separate channels per workflow), Obsidian for notes (markdown-first), Coolify for self-hosted services.

@rvrsh3ll
rvrsh3ll / windows-keys.md
Created February 18, 2024 22:44
Windows Product Keys

NOTE

These are NOT product / license keys that are valid for Windows activation.
These keys only select the edition of Windows to install during setup, but they do not activate or license the installation.

Index

@coodoo
coodoo / outline.md
Created March 7, 2026 01:45
「第二屆 AI 取暖會」講義文字稿。欲收到之後活動報名通知請前往此頁登記:https://forms.gle/H3Xa4fseQNoBz3qS8

/* 基礎知識 -------------------------------------------------- */

從最基本操作觀察 claude code context 運作原理

- 目地是透過觀察 claude code 背後的`交談過程`與`資料結構` 從而瞭解 context 管理的重要性

- 如何監看 tools + system prompt 改化學人家怎麼寫提示與設計工具
@VarunVats9
VarunVats9 / ConsumerTask.java
Last active March 9, 2026 13:45
Count Min Sketch
import java.util.concurrent.BlockingQueue;
public class ConsumerTask implements Runnable {
private static final int H1 = 0;
private static final int H2 = 1;
private static final int H3 = 2;
private static final int H4 = 3;
final static int LIMIT = 100;
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active March 9, 2026 13:41
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This does not works in browser for quests which require you to play a game! Use the desktop app to complete those.

How to use this script:

  1. Accept a quest under the Quests tab
  2. Press Ctrl+Shift+I to open DevTools
  3. Go to the Console tab
  4. Paste the following code and hit enter: